# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=dissent
pkgver=0.0.22
pkgrel=1
pkgdesc="Lightweight and modern Discord client"
url="https://libdb.so/dissent"
# riscv64: https://github.com/ianlancetaylor/cgosymbolizer/issues/20
arch="all !riscv64"
license="GPL-3.0-or-later"
options="net"	# go dependencies
makedepends="
	go
	gobject-introspection-dev
	gtk4.0-dev
	libadwaita-dev
	"
source="
	https://github.com/diamondburned/dissent/archive/v$pkgver/dissent-$pkgver.tar.gz
	dissent.desktop
	"

build() {
	go build ./main.go
}

check() {
	# no tests yet. but sure, try
	go test ./...
}

package() {
	install -Dm775 main "$pkgdir"/usr/bin/"$pkgname"
	install -Dm644 "$srcdir"/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
	install -Dm644 ./internal/icons/hicolor/scalable/apps/so.libdb.dissent.svg -t "$pkgdir"/usr/share/icons/hicolor/scalable/apps/
}

sha512sums="
dbf79c7e5cda0edd78a4793910f3d6625f038156d03b57dab9f3132cde0b86dee2b159f59e3d4fe79e13fc799789d1d9935c9a08697054812bd40c82a21cbda2  dissent-0.0.22.tar.gz
c454be19d716d0e6a9265423e87d75af2bc7998dd953b606ddf4dcb8e31335fd0b89dec083fc8d114ee1de11ccca1f0b021c1ca2ae760f3e92de66c58dc3d485  dissent.desktop
"
